import { useRoutes } from 'react-router-dom'
import Home from '../views/Home'
import ClassTodo from '../views/ClassTodo'
import Error from '../views/Error'
const RouterView = () => {
    const routes = useRoutes(
        [
            {
                path: '/',
                element: <Home />
            },
            {
                path: '/classTodo',
                element: <ClassTodo />
            },
            {
                path: '*',
                element:<Error/> 
            }
        ])
    return routes
}
export default RouterView